package com.gsq.learning.mybatisplugin.service;

import com.gsq.learning.mybatisplugin.dao.UserDao;
import com.gsq.learning.mybatisplugin.domain.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author guishangquan
 * @date 2018/8/23
 */
@Service
public class UserService {

    @Resource
    private UserDao userDao;

    public User findByName(String name) {
        return userDao.findByName(name);
    }

    public User findByNameAndAge(String name, Integer age) {
        return userDao.findByNameAndAge(name, age);
    }

    public List<User> findAll() {
        return userDao.findAll();
    }
}
